import type { IPageQuery } from '@/api/types';

// 部门查询条件
export type DeptQuery = IPageQuery & {
  name?: string;
  pid?: number;
  companyId?: number;
};

// 部门领导
export type DeptLeader = {
  id?: number;
  name?: string;
};

// 公司表单数据
export type CompanyForm = {
  id?: number;
  name: string;
  sort: number;
  leaders: DeptLeader[];
};

// 车队表单数据
export type FleetForm = {
  id?: number;
  name: string;
  companyId: number;
  sort: number;
  leaders: DeptLeader[];
};

// 部门列表数据
export type DeptRow = {
  id: number;
  name: string;
  sort: number;
  pid: number;
  companyId?: number;
  deep?: number;
  hasChildren?: string;
  isLock?: string;
  delFlag?: string;
  remark?: string;
  createId?: number;
  updateId?: number;
  createTime: string;
  updateTime: string;
  scheduleId?: number;
  leaders: DeptLeader[];
  children?: DeptRow[];
};